function partPage(type_id,limit,obj){
    $.ajax({
        url:'/ajax/aj_part_page.php',
        type:'POST',
        data:{type_id:type_id,limit:limit},
        success:function(data){
            $('.page-wrapper').html(data);
        },
    });
    $(obj).parent().find('a').removeClass('page-current');
    $(obj).addClass('page-current');
    
}
function test(content){
    if(content.length > 2){
      $.ajax({
        url:'/../ajax/aj_search.php',
        type:'POST',
        data:{content:content},
        success:function(data){
          $('.table_pro').html(data);
          //alert(data);  
        },
    });  
    }
    
}
function formatDollar(num) {
    var p = num.toFixed(0).split(".");
    return   p[0].split("").reverse().reduce(function(acc, num, i, orig) {
        return  num + (i && !(i % 3) ? "," : "") + acc;
    }, "") + " đ "
}
function delProduct(id){
   var dk = confirm("Chắc chắn xóa ?");
   if(dk){
      window.location.href = "delete.php?pro_id=" + id;
   }
}
function delArticle(id){
   var dk = confirm("Chắc chắn xóa ?");
   if(dk){
      window.location.href = "delete.php?art_id=" + id;
   }
}
function append_overlay(){
   $('body').append('<div class="overlay"></div>');
}